home *** CD-ROM | disk | FTP | other *** search
- $! RCSid[] = "@(#)$Header: make.com,v 3.1 86/12/22 14:01:25 pb Rel $"
- $!
- $! Where does the DERFIL reside ?
- $ NRSPROG = "SYS$DISK:[]NRS.EXE"
- $ NRSUSER = " "
- $ NRSPW = ""
- $ STDCONF = "STDCONF.COM"
- $ LOCALCONF = "LOCALCONF.COM"
- $
- $ @'STDCONF'
- $ @'LOCALCONF'
- $
- $ IF NRSUSER .EQS. " " THEN WRITE SYS$OUTPUT "Please set NRS user name and password in MAKE.COM"
- $ TMPNAME = "NRSTEMP.TMP;1"
- $!
- $! Called as ``@make op1 op2 op3 .....'' where
- $! CONFIGURE Reconfigure the system (not defined yet)
- $! CC list Compile the comma separator list of sources
- $! CCALL == CC main,misc,...
- $! LINK link together all the binaries into NRS.EXE
- $! COMPILE == CCALL LINK
- $! GETFILES Fetch the DERFIL1 file from the NRS
- $! CONVERT Convert it into C format (seekable file)
- $! NRS Use VMS.CF to generate NRS.OUT
- $!
- $! What to do if no arguments ? ``@make configure'' zaps P1, P2 and P5.
- $ IF P1 .NES. "" THEN GOTO SOME_ARGS
- $ P1 = "CONFIGURE" ! "CONFIGURE"
- $ P2 = "COMPILE" ! "COMPILE"
- $ P3 = "" ! "FETCH"
- $ P4 = "" ! "CONVERT"
- $ P5 = "" ! "NRS"
- $SOME_ARGS:
- $! Initialise the counter
- $ X=0
- $NEXT_ARG:
- $! Process the next argument
- $! Where to goto whhen finished processing ...
- $ RETURN_ADDR="NEXT_ARG"
- $ X=X+1
- $ Y=P'X'
- $ IF Y .NES. "" THEN GOTO 'Y'
- $! Nothing to do -- just loop
- $ IF X .LT. 8 THEN GOTO 'RETURN_ADDR'
- $ EXIT
- $!
- $COMPILE:
- $! compile == CCALL then LINK
- $ RETURN_ADDR="COMPILE2"
- $ GOTO CCALL
- $COMPILE2:
- $ RETURN_ADDR="NEXT_ARG"
- $ GOTO LINK
- $!
- $CONFIG:
- $CONFIGURE:
- $!
- $! Now tailor the special files
- $! generate an nrs.h
- $ @nrs.VMS
- $ @text.VMS
- $ @vms.VMS
- $!
- $! DEFINE SYS$OUTPUT/USER NIL:
- $ EDIT/NOJOURNAL make.com
- "CONFIGURE
-
- "CONFIGURE
-
- "CONFIGURE
- delete
- insert;$ P1 = "" ! "CONFIGURE"
- "COMPILE
- delete
- insert;$ P2 = "" ! "COMPILE"
- "NRS
- delete
- insert;$ P5 = "NRS" ! "NRS"
- exit
- $ GOTO 'RETURN_ADDR'
- $!
- $CCALL:
- $! CC everything
- $ P'X'="config,defs,lru,main,misc,output"
- $ X=X-1
- $CC:
- $! Compile the next supplied argument.
- $ X=X+1
- $ Y=P'X'
- $ WRITE SYS$OUTPUT "compiling ''Y' ...."
- $! make <sys/thing.h> map onto SYS$LIBRARY
- $ DEFINE SYS SYS$LIBRARY/USER_MODE
- $! Now compile it .....
- $ cc 'Y'
- $ GOTO 'RETURN_ADDR'
- $!
- $LINK:
- $! Now link it together
- $! Pick up
- $ WRITE SYS$OUTPUT "linking ...."
- $ DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCRTL/USER
- $ link config,defs,lru,main,misc,output
- $ rename config.exe 'NRSPROG'
- $ GOTO 'RETURN_ADDR'
- $!
- $GETFILES:
- $! get.atomic - drag all the relevant files from the salford machine
- $! there are quite a few, but most only have one or two lines.
- $!
- $! If you have problems with salfords address, it is currently
- $! 000014901000/SPCP.FTP
- $!
- $! Ensure input from TT in case null USER/PW
- $ DEFINE SYS$INPUT TT
- $ TRANSFER nrs::"make.nrs>database>''dirsample'" 'datadir''dirsample' 'NRSUSER' 'NRSPW'
- $ GOTO 'RETURN_ADDR'
- $!
- $CONVERT:
- $! The derfil needs to be converted to be Stream
- $ DELETE 'TMPNAME'
- $ CREATE 'TMPNAME'
- FILE
- BEST_TRY_CONTIGUOUS no
- CLUSTER_SIZE 1
- CONTIGUOUS no
- ORGANIZATION sequential
- RECORD
- BLOCK_SPAN yes
- CARRIAGE_CONTROL none
- FORMAT stream_LF
- SIZE 0
- $ CONVERT/fdl='TMPNAME' 'datadir''dirsample' 'datadir''dirsample'
- $ DELETE 'TMPNAME'
- $ GOTO 'RETURN_ADDR'
- $!
- $NRS:
- $! Run it, sending output to NRS.OUT
- $ DEFINE SYS$OUTPUT/USER_MODE NRS.OUT
- $ NRSCOMMAND:=$'NRSPROG'
- $ NRSCOMMAND vms.cf
- $ GOTO 'RETURN_ADDR'
-